---
kind: Namespace
apiVersion: v1
metadata:
  name: kuboard

---
kind: ServiceAccount
apiVersion: v1
metadata:
  name: kuboard-admin
  namespace: kuboard

---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: kuboard-admin-crb
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
  - kind: ServiceAccount
    name: kuboard-admin
    namespace: kuboard

---
kind: ServiceAccount
apiVersion: v1
metadata:
  name: kuboard-viewer
  namespace: kuboard

---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: kuboard-viewer-crb
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: view
subjects:
  - kind: ServiceAccount
    name: kuboard-viewer
    namespace: kuboard

---
apiVersion: v1
kind: Secret
type: kubernetes.io/service-account-token
metadata:
  name: kuboard-admin-token
  namespace: kuboard
  annotations:
    kubernetes.io/service-account.name: "kuboard-admin"

---
apiVersion: v1
kind: Secret
type: kubernetes.io/service-account-token
metadata:
  name: kuboard-viewer-token
  namespace: kuboard
  annotations:
    kubernetes.io/service-account.name: "kuboard-viewer"